# Contributor: Laurent Bercot <ska-devel@skarnet.org>
# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
pkgname=s6-linux-init
pkgver=1.1.2.0
pkgrel=0
pkgdesc="Set of tools to create and run an s6-based init system"
url=https://skarnet.org/software/s6-linux-init/
arch="all"
license="ISC"
options="!check"
makedepends="skalibs-dev>=2.14 execline-dev s6-dev>=2.12 linux-headers"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://skarnet.org/software/s6-linux-init/s6-linux-init-$pkgver.tar.gz"

build() {
	./configure \
		--enable-shared \
		--enable-static \
		--disable-allstatic \
		--prefix=/usr \
		--libdir=/usr/lib \
		--skeldir=/etc/s6-linux-init/skel
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc
	cp -a "$builddir"/doc "$subpkgdir"/usr/share/doc/$pkgname
}

sha512sums="
76376c4d407e665f67f733f1366dbacca58d268ebdbe22a9147cb102d519bd4c5887a345f66db2005d29ed9a841cb5a388c73c7d8df00d984cc4a25b9a813786  s6-linux-init-1.1.2.0.tar.gz
"
